Multimedia time warping system

ABSTRACT

A multimedia time warping system. The invention allows the user to store selected television broadcast programs while the user is simultaneously watching or reviewing another program. A preferred embodiment of the invention accepts television (TV) input streams in a multitude of forms, for example, National Television Standards Committee (NTSC) or PAL broadcast, and digital forms such as Digital Satellite System (DSS), Digital Broadcast Services (DBS), or Advanced Television Standards Committee (ATSC). The TV streams are converted to an Moving Pictures Experts Group (MPEG) formatted stream for internal transfer and manipulation and are parsed and separated it into video and audio components. The components are stored in temporary buffers. Events are recorded that indicate the type of component that has been found, where it is located, and when it occurred. The program logic is notified that an event has occurred and the data is extracted from the buffers. The parser and event buffer decouple the CPU from having to parse the MPEG stream and from the real time nature of the data streams which allows for slower CPU and bus speeds and translate to lower system costs. The video and audio components are stored on a storage device and when the program is requested for display, the video and audio components are extracted from the storage device and reassembled into an MPEG stream which is sent to a decoder. The decoder converts the MPEG stream into TV output signals and delivers the TV output signals to a TV receiver. User control commands are accepted and sent through the system. These commands affect the flow of said MPEG stream and allow the user to view stored programs with at least the following functions: reverse, fast forward, play, pause, index, fast/slow reverse play, and fast/slow play.

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application is a divisional of U.S. Ser. No. 09/827,029filed Apr. 5, 2001 (Attorney Docket No. TIVO0003C).

BACKGROUND OF THE INVENTION

[0002] 1. Technical Field p The invention relates to the time shiftingof television broadcast signals. More particularly, the inventionrelates to the real time capture, storage, and display of televisionbroadcast signals.

[0003] 2. Description of the Prior Art

[0004] The Video Cassette Recorder (VCR) has changed the lives oftelevision (TV) viewers throughout the world. The VCR has offeredviewers the flexibility to time-shift TV programs to match theirlifestyles.

[0005] The viewer stores TV programs onto magnetic tape using the VCR.The VCR gives the viewer the ability to play, rewind, fast forward andpause the stored program material. These functions enable the viewer topause the program playback whenever he desires, fast forward throughunwanted program material or commercials, and to replay favorite scenes.However, a VCR cannot both capture and play back information at the sametime.

[0006] One approach to solving this problem is to use several VCRs. Forexample, if two video tape recorders are available, it might be possibleto Ping-Pong between the two. In this case, the first recorder isstarted at the beginning of the program of interest. If the viewerwishes to rewind the broadcast, the second recorder begins recording,while the first recorder is halted, rewound to the appropriate place,and playback initiated. However, at least a third video tape recorder isrequired if the viewer wishes to fast forward to some point in timeafter the initial rewind was requested. In this case, the third recorderstarts recording the broadcast stream while the second is halted andrewound to the appropriate position. Continuing this exercise, one canquickly see that the equipment becomes unwieldy, unreliable, expensive,and hard to operate, while never supporting all desired functions. Inaddition, tapes are of finite length, and may potentially end atinconvenient times, drastically lowering the value of the solution.

[0007] The use of digital computer systems to solve this problem hasbeen suggested. U.S. Pat. No. 5,371,551 issued to Logan et al., on Dec.6, 1994, teaches a method for concurrent video recording and playback.It presents a microprocessor controlled broadcast and playback device.Said device compresses and stores video data onto a hard disk. However,this approach is difficult to implement because the processorrequirements for keeping up with the high video rates makes the deviceexpensive and problematic. The microprocessor must be extremely fast tokeep up with the incoming and outgoing video data.

[0008] It would be advantageous to provide a multimedia time warpingsystem that gives the user the ability to simultaneously record and playback TV broadcast programs. It would further be advantageous to providea multimedia time warping system that utilizes an approach thatdecouples the microprocessor from the high video data rates, therebyreducing the microprocessor and system requirements which are at apremium.

SUMMARY OF THE INVENTION

[0009] The invention provides a multimedia time warping system. Theinvention utilizes an easily manipulated, low cost multimedia storageand display system that allows the user to view a television broadcastprogram with the option of instantly reviewing previous scenes withinthe program. In addition, the invention allows the user to storeselected television broadcast programs while the user is simultaneouslywatching or reviewing another program.

[0010] A preferred embodiment of the invention accepts television (TV)input streams in a multitude of forms, for example, analog forms such asNational Television Standards Committee (NTSC) or PAL broadcast, anddigital forms such as Digital Satellite System (DSS), Digital BroadcastServices (DBS), or Advanced Television Standards Committee (ATSC).Analog TV streams are converted to an Moving Pictures Experts Group(MPEG) formatted stream for internal transfer and manipulation, whilepre-formatted MPEG streams are extracted from the digital TV signal andpresented in a similar format to encoded analog streams.

[0011] The invention parses the resulting MPEG stream and separates itinto its video and audio components. It then stores the components intotemporary buffers. Events are recorded that indicate the type ofcomponent that has been found, where it is located, and when itoccurred. The program logic is notified that an event has occurred andthe data is extracted from the buffers.

[0012] The parser and event buffer decouple the CPU from having to parsethe MPEG stream and from the real time nature of the data streams. Thisdecoupling allows for slower CPU and bus speeds which translate to lowersystem costs.

[0013] The video and audio components are stored on a storage device.When the program is requested for display, the video and audiocomponents are extracted from the storage device and reassembled into anMPEG stream.

[0014] The MPEG stream is sent to a decoder. The decoder converts theMPEG stream into TV output signals and delivers the TV output signals toa TV receiver.

[0015] User control commands are accepted and sent through the system.These commands affect the flow of said MPEG stream and allow the user toview stored programs with at least the following functions: reverse,fast forward, play, pause, index, fast/slow reverse play, and fast/slowplay.

[0016] Other aspects and advantages of the invention will becomeapparent from the following detailed description in combination with theaccompanying drawings, illustrating, by way of example, the principlesof the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

[0017]FIG. 1 is a block schematic diagram of a high level view of apreferred embodiment of the invention according to the invention;

[0018]FIG. 2 is a block schematic diagram of a preferred embodiment ofthe invention using multiple input and output modules according to theinvention;

[0019]FIG. 3 is a schematic diagram of an Moving Pictures Experts Group(MPEG) data stream and its video and audio components according to theinvention;

[0020]FIG. 4 is a block schematic diagram of a parser and four directmemory access (DMA) input engines contained in the Media Switchaccording to the invention;

[0021]FIG. 5 is a schematic diagram of the components of a packetizedelementary stream (PES) buffer according to the invention;

[0022]FIG. 6 is a schematic diagram of the construction of a PES bufferfrom the parsed components in the Media Switch output circular buffers;

[0023]FIG. 7 is a block schematic diagram of the Media Switch and thevarious components that it communicates with according to the invention;

[0024]FIG. 8 is a block schematic diagram of a high level view of theprogram logic according to the invention;

[0025]FIG. 9 is a block schematic diagram of a class hierarchy of theprogram logic according to the invention;

[0026]FIG. 10 is a block schematic diagram of a preferred embodiment ofthe clip cache component of the invention according to the invention;

[0027]FIG. 11 is a block schematic diagram of a preferred embodiment ofthe invention that emulates a broadcast studio video mixer according tothe invention;

[0028]FIG. 12 is a block schematic diagram of a closed caption parseraccording to the invention; and

[0029]FIG. 13 is a block schematic diagram of a high level view of apreferred embodiment of the invention utilizing a VCR as an integralcomponent of the invention according to the invention.

DETAILED DESCRIPTION OF THE INVENTION

[0030] The invention is embodied in a multimedia time warping system. Asystem according to the invention provides a multimedia storage anddisplay system that allows the user to view a television broadcastprogram with the option of instantly reviewing previous scenes withinthe program. The invention additionally provides the user with theability to store selected television broadcast programs whilesimultaneously watching or reviewing another program and to view storedprograms with at least the following functions: reverse, fast forward,play, pause, index, fast/slow reverse play, and fast/slow play.

[0031] Referring to FIG. 1, a preferred embodiment of the invention hasan Input Section 101, Media Switch 102, and an Output Section 103. TheInput Section 101 takes television (TV) input streams in a multitude offorms, for example, National Television Standards Committee (NTSC) orPAL broadcast, and digital forms such as Digital Satellite System (DSS),Digital Broadcast Services (DBS), or Advanced Television StandardsCommittee (ATSC). DBS, DSS and ATSC are based on standards called MovingPictures Experts Group 2 (MPEG2) and MPEG2 Transport. MPEG2 Transport isa standard for formatting the digital data stream from the TV sourcetransmitter so that a TV receiver can disassemble the input stream tofind programs in the multiplexed signal. The Input Section 101 producesMPEG streams. An MPEG2 transport multiplex supports multiple programs inthe same broadcast channel, with multiple video and audio feeds andprivate data. The Input Section 101 tunes the channel to a particularprogram, extracts a specific MPEG program out of it, and feeds it to therest of the system. Analog TV signals are encoded into a similar MPEGformat using separate video and audio encoders, such that the remainderof the system is unaware of how the signal was obtained. Information maybe modulated into the Vertical Blanking Interval (VBI) of the analog TVsignal in a number of standard ways; for example, the North AmericanBroadcast Teletext Standard (NABTS) may be used to modulate informationonto lines 10 through 20 of an NTSC signal, while the FCC mandates theuse of line 21 for Closed Caption (CC) and Extended Data Services (EDS).Such signals are decoded by the input section and passed to the othersections as if they were delivered via an MPEG2 private data channel.

[0032] The Media Switch 102 mediates between a microprocessor CPU 106,hard disk or storage device 105, and memory 104. Input streams areconverted to an MPEG stream and sent to the Media Switch 102. The MediaSwitch 102 buffers the MPEG stream into memory. It then performs twooperations if the user is watching real time TV: the stream is sent tothe Output Section 103 and it is written simultaneously to the hard diskor storage device 105.

[0033] The Output Section 103 takes MPEG streams as input and producesan analog TV signal according to the NTSC, PAL, or other required TVstandards. The Output Section 103 contains an MPEG decoder, On-ScreenDisplay (OSD) generator, analog TV encoder and audio logic. The OSDgenerator allows the program logic to supply images which will beoverlayed on top of the resulting analog TV signal. Additionally, theOutput Section can modulate information supplied by the program logiconto the VBI of the output signal in a number of standard formats,including NABTS, CC and EDS.

[0034] With respect to FIG. 2, the invention easily expands toaccommodate multiple Input Sections (tuners) 201, 202, 203, 204, eachcan be tuned to different types of input. Multiple Output Modules(decoders) 206, 207, 208, 209 are added as well. Special effects such aspicture in a picture can be implemented with multiple decoders. TheMedia Switch 205 records one program while the user is watching another.This means that a stream can be extracted off the disk while anotherstream is being stored onto the disk.

[0035] Referring to FIG. 3, the incoming MPEG stream 301 has interleavedvideo 302, 305, 306 and audio 303, 304, 307 segments. These elementsmust be separated and recombined to create separate video 308 and audio309 streams or buffers. This is necessary because separate decoders areused to convert MPEG elements back into audio or video analogcomponents.

[0036] Such separate delivery requires that time sequence information begenerated so that the decoders may be properly synchronized for accurateplayback of the signal.

[0037] The Media Switch enables the program logic to associate propertime sequence information with each segment, possibly embedding itdirectly into the stream. The time sequence information for each segmentis called a time stamp. These time stamps are monotonically increasingand start at zero each time the system boots up. This allows theinvention to find any particular spot in any particular video segment.For example, if the system needs to read five seconds into an incomingcontiguous video stream that is being cached, the system simply has tostart reading forward into the stream and look for the appropriate timestamp.

[0038] A binary search can be performed on a stored file to index into astream. Each stream is stored as a sequence of fixed-size segmentsenabling fast binary searches because of the uniform time stamping. Ifthe user wants to start in the middle of the program, the systemperforms a binary search of the stored segments until it finds theappropriate spot, obtaining the desired results with a minimal amount ofinformation. If the signal were instead stored as an MPEG stream, itwould be necessary to linearly parse the stream from the beginning tofind the desired location.

[0039] With respect to FIG. 4, the Media Switch contains four inputDirect Memory Access (DMA) engines 402, 403, 404, 405 each DMA enginehas an associated buffer 410, 411, 412, 413. Conceptually, each DMAengine has pointer 406, a limit for that pointer 407, a next pointer408, and a limit for the next pointer 409. Each DMA engine is dedicatedto a particular type of information, for example, video 402, audio 403,and parsed events 405. The buffers 410, 411, 412, 413 are circular andcollect the specific information. The DMA engine increments the pointer406 into the associated buffer until it reaches the limit 407 and thenloads the next pointer 408 and limit 409. Setting the pointer 406 andnext pointer 408 to the same value, along with the corresponding limitvalue creates a circular buffer. The next pointer 408 can be set to adifferent address to provide vector DMA.

[0040] The input stream flows through a parser 401. The parser 401parses the stream looking for MPEG distinguished events indicating thestart of video, audio or private data segments. For example, when theparser 401 finds a video event, it directs the stream to the video DMAengine 402. The parser 401 buffers up data and DMAs it into the videobuffer 410 through the video DMA engine 402. At the same time, theparser 401 directs an event to the event DMA engine 405 which generatesan event into the event buffer 413. When the parser 401 sees an audioevent, it redirects the byte stream to the audio DMA engine 403 andgenerates an event into the event buffer 413. Similarly, when the parser401 sees a private data event, it directs the byte stream to the privatedata DMA engine 404 and directs an event to the event buffer 413. TheMedia Switch notifies the program logic via an interrupt mechanism whenevents are placed in the event buffer.

[0041] Referring to FIGS. 4 and 5, the event buffer 413 is filled by theparser 401 with events. Each event 501 in the event buffer has an offset502, event type 503, and time stamp field 504. The parser 401 providesthe type and offset of each event as it is placed into the buffer. Forexample, when an audio event occurs, the event type field is set to anaudio event and the offset indicates the location in the audio buffer411. The program logic knows where the audio buffer 411 starts and addsthe offset to find the event in the stream. The address offset 502 tellsthe program logic where the next event occurred, but not where it ended.The previous event is cached so the end of the current event can befound as well as the length of the segment.

[0042] With respect to FIGS. 5 and 6, the program logic readsaccumulated events in the event buffer 602 when it is interrupted by theMedia Switch 601. From these events the program logic generates asequence of logical segments 603 which correspond to the parsed MPEGsegments 615. The program logic converts the offset 502 into the actualaddress 610 of each segment, and records the event length 609 using thelast cached event. If the stream was produced by encoding an analogsignal, it will not contain Program Time Stamp (PTS) values, which areused by the decoders to properly present the resulting output. Thus, theprogram logic uses the generated time stamp 504 to calculate a simulatedPTS for each segment and places that into the logical segment time stamp607. In the case of a digital TV stream, PTS values are already encodedin the stream. The program logic extracts this information and places itin the logical segment time stamp 607.

[0043] The program logic continues collecting logical segments 603 untilit reaches the fixed buffer size. When this occurs, the program logicgenerates a new buffer, called a Packetized Elementary Stream (PES) 605buffer containing these logical segments 603 in order, plus ancillarycontrol information. Each logical segment points 604 directly to thecircular buffer,e.g., the video buffer 613, filled by the Media Switch601. This new buffer is then passed to other logic components, which mayfurther process the stream in the buffer in some way, such as presentingit for decoding or writing it to the storage media. Thus, the MPEG datais not copied from one location in memory to another by the processor.This results in a more cost effective design since lower memorybandwidth and processor bandwidth is required.

[0044] A unique feature of the MPEG stream transformation into PESbuffers is that the data associated with logical segments need not bepresent in the buffer itself, as presented above. When a PES buffer iswritten to storage, these logical segments are written to the storagemedium in the logical order in which they appear. This has the effect ofgathering components of the stream, whether they be in the video, audioor private data circular buffers, into a single linear buffer of streamdata on the storage medium. The buffer is read back from the storagemedium with a single transfer from the storage media, and the logicalsegment information is updated to correspond with the actual locationsin the buffer 606. Higher level program logic is unaware of thistransformation, since it handles only the logical segments, thus streamdata is easily managed without requiring that the data ever be copiedbetween locations in DRAM by the CPU.

[0045] A unique aspect of the Media Switch is the ability to handle highdata rates effectively and inexpensively. It performs the functions oftaking video and audio data in, sending video and audio data out,sending video and audio data to disk, and extracting video and audiodata from the disk on a low cost platform. Generally, the Media Switchruns asynchronously and autonomously with the microprocessor CPU, usingits DMA capabilities to move large quantities of information withminimal intervention by the CPU.

[0046] Referring FIG. 7, the input side of the Media Switch 701 isconnected to an MPEG encoder 703. There are also circuits specific toMPEG audio 704 and vertical blanking interval (VBI) data 702 feedinginto the Media Switch 701. If a digital TV signal is being processedinstead, the MPEG encoder 703 is replaced with an MPEG2 TransportDemultiplexor, and the MPEG audio encoder 704 and VBI decoder 702 aredeleted. The demultiplexor multiplexes the extracted audio, video andprivate data channel streams through the video input Media Switch port.

[0047] The parser 705 parses the input data stream from the MPEG encoder703, audio encoder 704 and VBI decoder 702, or from the transportdemultiplexor in the case of a digital TV stream. The parser 705 detectsthe beginning of all of the important events in a video or audio stream,the start of all of the frames, the start of sequence headers—all of thepieces of information that the program logic needs to know about inorder to both properly play back and perform special effects on thestream, e.g. fast forward, reverse, play, pause, fast/slow play,indexing, and fast/slow reverse play.

[0048] The parser 705 places tags 707 into the FIFO 706 when itidentifies video or audio segments, or is given private data. The DMA709 controls when these tags are taken out. The tags 707 and the DMAaddresses of the segments are placed into the event queue 708. The frametype information, whether it is a start of a video I-frame, videoB-frame, video P-frame, video PES, audio PES, a sequence header, anaudio frame, or private data packet, is placed into the event queue 708along with the offset in the related circular buffer where the piece ofinformation was placed. The program logic operating in the CPU 713examines events in the circular buffer after it is transferred to theDRAM 714.

[0049] The Media Switch 701 has a data bus 711 that connects to the CPU713 and DRAM 714. An address bus 712 is also shared between the MediaSwitch 701, CPU 713, and DRAM 714. A hard disk or storage device 710 isconnected to one of the ports of the Media Switch 701. The Media Switch701 outputs streams to an MPEG video decoder 715 and a separate audiodecoder 717. The audio decoder 717 signals contain audio cues generatedby the system in response to the user's commands on a remote control orother internal events. The decoded audio output from the MPEG decoder isdigitally mixed 718 with the separate audio signal. The resultingsignals contain video, audio, and on-screen displays and are sent to theTV 716.

[0050] The Media Switch 701 takes in 8-bit data and sends it to thedisk, while at the same time extracts another stream of data off of thedisk and sends it to the MPEG decoder 715. All of the DMA enginesdescribed above can be working at the same time. The Media Switch 701can be implemented in hardware using a Field Programmable Gate Array(FPGA), ASIC, or discrete logic.

[0051] Rather than having to parse through an immense data streamlooking for the start of where each frame would be, the program logiconly has to look at the circular event buffer in DRAM 714 and it cantell where the start of each frame is and the frame type. This approachsaves a large amount of CPU power, keeping the real time requirements ofthe CPU 713 small. The CPU 713 does not have to be very fast at anypoint in time. The Media Switch 701 gives the CPU 713 as much time aspossible to complete tasks. The parsing mechanism 705 and event queue708 decouple the CPU 713 from parsing the audio, video, and buffers andthe real time nature of the streams, which allows for lower costs. Italso allows the use of a bus structure in a CPU environment thatoperates at a much lower clock rate with much cheaper memory than wouldbe required otherwise.

[0052] The CPU 713 has the ability to queue up one DMA transfer and canset up the next DMA transfer at its leisure. This gives the CPU 713large time intervals within which it can service the DMA controller 709.The CPU 713 may respond to a DMA interrupt within a larger time windowbecause of the large latency allowed. MPEG streams, whether extractedfrom an MPEG2 Transport or encoded from an analog TV signal, aretypically encoded using a technique called Variable Bit Rate encoding(VBR). This technique varies the amount of data required to represent asequence of images by the amount of movement between those images. Thistechnique can greatly reduce the required bandwidth for a signal,however sequences with rapid movement (such as a basketball game) may beencoded with much greater bandwidth requirements. For example, theHughes DirecTV satellite system encodes signals with anywhere from 1 to10 Mb/s of required bandwidth, varying from frame to frame. It would bedifficult for any computer system to keep up with such rapidly varyingdata rates without this structure.

[0053] With respect to FIG. 8, the program logic within the CPU hasthree conceptual components: sources 801, transforms 802, and sinks 803.The sources 801 produce buffers of data. Transforms 802 process buffersof data and sinks 803 consume buffers of data. A transform isresponsible for allocating and queuing the buffers of data on which itwill operate. Buffers are allocated as if “empty” to sources of data,which give them back “full”. The buffers are then queued and given tosinks as “full”, and the sink will return the buffer “empty”.

[0054] A source 801 accepts data from encoders, e.g., a digitalsatellite receiver. It acquires buffers for this data from thedownstream transform, packages the data into a buffer, then pushes thebuffer down the pipeline as described above. The source object 801 doesnot know anything about the rest of the system. The sink 803 consumesbuffers, taking a buffer from the upstream transform, sending the datato the decoder, and then releasing the buffer for reuse.

[0055] There are two types of transforms 802 used: spatial and temporal.Spatial transforms are transforms that perform, for example, an imageconvolution or compression/decompression on the buffered data that ispassing through. Temporal transforms are used when there is no timerelation that is expressible between buffers going in and buffers comingout of a system. Such a transform writes the buffer to a file 804 on thestorage medium. The buffer is pulled out at a later time, sent down thepipeline, and properly sequenced within the stream.

[0056] Referring to FIG. 9, a C++ class hierarchy derivation of theprogram logic is shown. The TiVo Media Kernel (Tmk) 904, 908, 913mediates with the operating system kernel. The kernel providesoperations such as: memory allocation, synchronization, and threading.The TmkCore 904, 908, 913 structures memory taken from the media kernelas an object. It provides operators, new and delete, for constructingand deconstructing the object. Each object (source 901, transform 902,and sink 903) is multi-threaded by definition and can run in parallel.

[0057] The TmkPipeline class 905, 909, 914 is responsible for flowcontrol through the system. The pipelines point to the next pipeline inthe flow from source 901 to sink 903. To pause the pipeline, forexample, an event called “pause” is sent to the first object in thepipeline. The event is relayed on to the next object and so on down thepipeline. This all happens asynchronously to the data going through thepipeline. Thus, similar to applications such as telephony, control ofthe flow of MPEG streams is asynchronous and separate from the streamsthemselves. This allows for a simple logic design that is at the sametime powerful enough to support the features described previously,including pause, rewind, fast forward and others. In addition, thisstructure allows fast and efficient switching between stream sources,since buffered data can be simply discarded and decoders reset using asingle event, after which data from the new stream will pass down thepipeline. Such a capability is needed, for example, when switching thechannel being captured by the input section, or when switching between alive signal from the input section and a stored stream.

[0058] The source object 901 is a TmkSource 906 and the transform object902 is a TmkXfrm 910. These are intermediate classes that definestandard behaviors for the classes in the pipeline. Conceptually, theyhandshake buffers down the pipeline. The source object 901 takes dataout of a physical data source, such as the Media Switch, and places itinto a PES buffer. To obtain the buffer, the source object 901 asks thedown stream object in his pipeline for a buffer (allocEmptyBuf). Thesource object 901 is blocked until there is sufficient memory. Thismeans that the pipeline is self-regulating; it has automatic flowcontrol. When the source object 901 has filled up the buffer, it handsit back to the transform 902 through the pushFullBuf function.

[0059] The sink 903 is flow controlled as well. It calls nextFullBufwhich tells the transform 902 that it is ready for the next filledbuffer. This operation can block the sink 903 until a buffer is ready.When the sink 903 is finished with a buffer (i.e., it has consumed thedata in the buffer) it calls releaseEmptyBuf. ReleaseEmptyBuf gives thebuffer back to the transform 902. The transform 902 can then hand thatbuffer, for example, back to the source object 901 to fill up again. Inaddition to the automatic flow-control benefit of this method, it alsoprovides for limiting the amount of memory dedicated to buffers byallowing enforcement of a fixed allocation of buffers by a transform.This is an important feature in achieving a cost-effective limited DRAMenvironment.

[0060] The MediaSwitch class 909 calls the allocEmptyBuf method of theTmkClipCache 912 object and receives a PES buffer from it. It then goesout to the circular buffers in the Media Switch hardware and generatesPES buffers. The MediaSwitch class 909 fills the buffer up and pushes itback to the TmkClipCache 912 object.

[0061] The TmkClipCache 912 maintains a cache file 918 on a storagemedium. It also maintains two pointers into this cache: a push pointer919 that shows where the next buffer coming from the source 901 isinserted; and a current pointer 920 which points to the current bufferused.

[0062] The buffer that is pointed to by the current pointer is handed tothe Vela decoder class 916. The Vela decoder class 916 talks to thedecoder 921 in the hardware. The decoder 921 produces a decoded TVsignal that is subsequently encoded into an analog TV signal in NTSC,PAL or other analog format. When the Vela decoder class 916 is finishedwith the buffer it calls releaseEmptyBuf.

[0063] The structure of the classes makes the system easy to test anddebug. Each level can be tested separately to make sure it performs inthe appropriate manner, and the classes may be gradually aggregated toachieve the desired functionality while retaining the ability toeffectively test each object.

[0064] The control object 917 accepts commands from the user and sendsevents into the pipeline to control what the pipeline is doing. Forexample, if the user has a remote control and is watching TV, the userpresses pause and the control object 917 sends an event to the sink 903,that tells it pause. The sink 903 stops asking for new buffers. Thecurrent pointer 920 stays where it is at. The sink 903 starts takingbuffers out again when it receives another event that tells it to play.The system is in perfect synchronization; it starts from the frame thatit stopped at.

[0065] The remote control may also have a fast forward key. When thefast forward key is pressed, the control object 917 sends an event tothe transform 902, that tells it to move forward two seconds. Thetransform 902 finds that the two second time span requires it to moveforward three buffers. It then issues a reset event to the downstreampipeline, so that any queued data or state that may be present in thehardware decoders is flushed. This is a critical step, since thestructure of MPEG streams requires maintenance of state across multipleframes of data, and that state will be rendered invalid by repositioningthe pointer. It then moves the current pointer 920 forward threebuffers. The next time the sink 903 calls nextFullBuf it gets the newcurrent buffer. The same method works for fast reverse in that thetransform 902 moves the current pointer 920 backwards.

[0066] A system clock reference resides in the decoder. The system clockreference is sped up for fast play or slowed down for slow play. Thesink simply asks for full buffers faster or slower, depending on theclock speed. With respect to FIG. 10, two other objects derived from theTmkXfrm class are placed in the pipeline for disk access. One is calledTmkClipReader 1003 and the other is called TmkClipWriter 1001. Bufferscome into the TmkClipWriter 1001 and are pushed to a file on a storagemedium 1004. TmkClipReader 1003 asks for buffers which are taken off ofa file on a storage medium 1005. A TmkClipReader 1003 provides only theallocEmptyBuf and pushFullBuf methods, while a TmkClipWriter 1001provides only the nextFullBuf and releaseEmptyBuf methods. ATmkClipReader 1003 therefore performs the same function as the input, or“push” side of a TmkClipCache 1002, while a TmkClipWriter 1001 thereforeperforms the same function as the output, or “pull” side of aTmkClipCache 1002. Referring to FIG. 11, a preferred embodiment thataccomplishes multiple functions is shown. A source 1101 has a TV signalinput. The source sends data to a PushSwitch 1102 which is a transformderived from TmkXfrm. The PushSwitch 1102 has multiple outputs that canbe switched by the control object 1114. This means that one part of thepipeline can be stopped and another can be started at the users whim.The user can switch to different storage devices. The PushSwitch 1102could output to a TmkClipWriter 1106, which goes onto a storage device1107 or write to the cache transform 1103. An important feature of thisapparatus is the ease with which it can selectively capture portions ofan incoming signal under the control of program logic. Based oninformation such as the current time, or perhaps a specific time span,or perhaps via a remote control button press by the viewer, aTmkClipWriter 1106 may be switched on to record a portion of the signal,and switched off at some later time. This switching is typically causedby sending a “switch” event to the PushSwitch 1102 object.

[0067] An additional method for triggering selective capture is throughinformation modulated into the VBI or placed into an MPEG private datachannel. Data decoded from the VBI or private data channel is passed tothe program logic. The program logic examines this data to determine ifthe data indicates that capture of the TV signal into which it wasmodulated should begin. Similarly, this information may also indicatewhen recording should end, or another data item may be modulated intothe signal indicating when the capture should end. The starting andending indicators may be explicitly modulated into the signal or otherinformation that is placed into the signal in a standard fashion may beused to encode this information.

[0068] With respect to FIG. 12, an example is shown which demonstrateshow the program logic scans the words contained within the closedcaption (CC) fields to determine starting and ending times, usingparticular words or phrases to trigger the capture. A stream of NTSC orPAL fields 1201 is presented. CC bytes are extracted from each odd field1202, and entered in a circular buffer 1203 for processing by the WordParser 1204. The Word Parser 1204 collects characters until itencounters a word boundary, usually space, period or other delineatingcharacter. Recall from above, that the MPEG audio and video segments arecollected into a series of fixed-size PES buffers. A special segment isadded to each PES buffer to hold the words extracted from the CC field1205. Thus, the CC information is preserved in time synchronization withthe audio and video, and can be correctly presented to the viewer whenthe stream is displayed. This also allows the stored stream to beprocessed for CC information at the leisure of the program logic, whichspreads out load, reducing cost and improving efficiency. In such acase, the words stored in the special segment are simply passed to thestate table logic 1206.

[0069] During stream capture, each word is looked up in a table 1206which indicates the action to take on recognizing that word. This actionmay simply change the state of the recognizer state machine 1207, or maycause the state machine 1207 to issue an action request, such as “startcapture”, “stop capture”, “phrase seen”, or other similar requests.Indeed, a recognized word or phrase may cause the pipeline to beswitched; for example, to overlay a different audio track if undesirablelanguage is used in the program.

[0070] Note that the parsing state table 1206 and recognizer statemachine 1207 may be modified or changed at any time. For example, adifferent table and state machine may be provided for each inputchannel. Alternatively, these elements may be switched depending on thetime of day, or because of other events.

[0071] Referring to FIG. 11, a PullSwitch is added 1104 which outputs tothe sink 1105. The sink 1105 calls nextFullBuf and releaseEmptyBuf toget or return buffers from the PullSwitch 1104. The PullSwitch 1104 canhave any number of inputs. One input could be an ActionClip 1113. Theremote control can switch between input sources. The control object 1114sends an event to the PullSwitch 1104, telling it to switch. It willswitch from the current input source to whatever input source thecontrol object selects.

[0072] An ActionClip class provides for sequencing a number of differentstored signals in a predictable and controllable manner, possibly withthe added control of viewer selection via a remote control. Thus, itappears as a derivative of a TmkXfrm object that accepts a “switch”event for switching to the next stored signal.

[0073] This allows the program logic or user to create custom sequencesof video output. Any number of video segments can be lined up andcombined as if the program logic or user were using a broadcast studiovideo mixer. TmkClipReaders 1108, 1109, 1110 are allocated and each ishooked into the PullSwitch 1104. The PullSwitch 1104 switches betweenthe TmkClipReaders 1108, 1109, 1110 to combine video and audio clips.Flow control is automatic because of the way the pipeline isconstructed. The Push and Pull Switches are the same as video switchesin a broadcast studio.

[0074] The derived class and resulting objects described here may becombined in an arbitrary way to create a number of different usefulconfigurations for storing, retrieving, switching and viewing of TVstreams. For example, if multiple input and output sections areavailable, one input is viewed while another is stored, and apicture-in-picture window generated by the second output is used topreview previously stored streams. Such configurations represent aunique and novel application of software transformations to achieve thefunctionality expected of expensive, sophisticated hardware solutionswithin a single cost-effective device.

[0075] With respect to FIG. 13, a high-level system view is shown whichimplements a VCR backup. The Output Module 1303 sends TV signals to theVCR 1307. This allows the user to record TV programs directly on tovideo tape. The invention allows the user to queue up programs from diskto be recorded on to video tape and to schedule the time that theprograms are sent to the VCR 1307. Title pages (EPG data) can be sent tothe VCR 1307 before a program is sent. Longer programs can be scaled tofit onto smaller video tapes by speeding up the play speed or droppingframes.

[0076] The VCR 1307 output can also be routed back into the Input Module1301. In this configuration the VCR acts as a backup system for theMedia Switch 1302. Any overflow storage or lower priority programming issent to the VCR 1307 for later retrieval.

[0077] The Input Module 1301 can decode and pass to the remainder of thesystem information encoded on the Vertical Blanking Interval (VBI). TheOutput Module 1303 can encode into the output VBI data provided by theremainder of the system. The program logic may arrange to encodeidentifying information of various kinds into the output signal, whichwill be recorded onto tape using the VCR 1307. Playing this tape backinto the input allows the program logic to read back this identifyinginformation, such that the TV signal recorded on the tape is properlyhandled. For example, a particular program may be recorded to tape alongwith information about when it was recorded, the source network, etc.When this program is played back into the Input Module, this informationcan be used to control storage of the signal, presentation to theviewer, etc.

[0078] One skilled in the art will readily appreciate that such amechanism may be used to introduce various data items to the programlogic which are not properly conceived of as television signals. Forinstance, software updates or other data may be passed to the system.The program logic receiving this data from the television stream mayimpose controls on how the data is handled, such as requiring certainauthentication sequences and/or decrypting the embedded informationaccording to some previously acquired key. Such a method works fornormal broadcast signals as well, leading to an efficient means ofproviding non-TV control information and data to the program logic.

[0079] Additionally, one skilled in the art will readily appreciate thatalthough a VCR is specifically mentioned above, any multimedia recordingdevice (e.g., a Digital Video Disk-Random Access Memory (DVD-RAM)recorder) is easily substituted in its place.

[0080] Although the invention is described herein with reference to thepreferred embodiment, one skilled in the art will readily appreciatethat other applications may be substituted for those set forth hereinwithout departing from the spirit and scope of the present invention.For example, the invention can be used in the detection of gamblingcasino crime. The input section of the invention is connected to thecasino's video surveillance system. Recorded video is cached andsimultaneously output to external VCRs. The user can switch to any videofeed and examine (i.e., rewind, play, slow play, fast forward, etc.) aspecific segment of the recorded video while the external VCRs are beingloaded with the real-time input video. Accordingly, the invention shouldonly be limited by the Claims included below.

1. A process for a digital video recorder, comprising the steps of:providing a plurality of input signal tuners; wherein said tuners acceptanalog and digital television broadcast signals; wherein each of saidtuners is individually tuned to a specific broadcast signal; convertinganalog television broadcast signals into a digital signal; separating adigital signal or digital television broadcast signal into its video andaudio components; storing said video and audio components on a storagedevice; providing a plurality of output devices; wherein each outputdevice extracts a specific video and audio component from said storagedevice; decoding each specific video and audio component into atelevision output signal; sending television output signals to at leastone display device; and wherein said decoding step allows playback rateand direction of each television output signal to be controlledindividually to perform variable rate fast forward and rewind, framestep, pause, and play functions.
 2. The process of claim 1, wherein auser controls the playback rate and direction of a television outputsignal through a remote control.
 3. The process of claim 1, furthercomprising the step of: providing a multimedia recording device, whereinsaid decoding step sends any of a specific video and audio component ora television output signal to said multimedia recording device forrecording.
 4. The process of claim 1, further comprising the step of:inserting on-screen displays into a television output signal.
 5. Theprocess of claim 1, further comprising the step of: providing editingmeans for creating custom sequences of video and/or audio output; andwherein said editing means allows any number of video and/or audiosegments to be lined up and combined and stored on said storage device.6. The process of claim 1, further comprising the step of: providingmeans for synchronizing video and audio components for proper playback.7. The process of claim 1, wherein an input signal tuner receives anyof: software updates or data.
 8. A process for a digital video recorder,comprising the steps of: receiving a plurality of television broadcastsignals; storing each television broadcast signal in a digital form on astorage device; providing a plurality of output devices; wherein eachoutput device extracts a specific digital broadcast signal from saidstorage device; converting each specific digital broadcast signal into atelevision output signal; sending television output signals to at leastone display device; and wherein said converting step allows playbackrate and direction of each television output signal to be controlledindividually to perform variable rate fast forward and rewind, framestep, pause, and play functions.
 9. The process of claim 8, wherein auser controls the playback rate and direction of a television outputsignal through a remote control.
 10. The process of claim 8, furthercomprising the step of: providing a multimedia recording device, whereinsaid converting step sends any of a specific digital broadcast signal ora television output signal to said multimedia recording device forrecording.
 11. The process of claim 8, further comprising the step of:inserting on-screen displays into a television output signal.
 12. Theprocess of claim 8, further comprising the step of: providing editingmeans for creating custom sequences of video and/or audio output; andwherein said editing means allows any number of video and/or audiosegments of digital broadcast signals to be lined up and combined andstored on said storage device.
 13. The process of claim 8, wherein atelevision broadcast signal can contain any of: software updates ordata.
 14. A process for a digital video recorder, comprising the stepsof: receiving a plurality of input streams; storing said plurality ofinput streams in digital form on a storage device; providing a pluralityof output devices; wherein each output device extracts a digital streamfrom said storage device; decoding each digital stream into a televisionoutput signal; sending television output signals to at least one displaydevice; and wherein said decoding step allows playback rate anddirection of each television output signal to be controlled individuallyto perform variable rate fast forward and rewind, frame step, pause, andplay functions.
 15. The process of claim 14, wherein a user controls theplayback rate and direction of a television output signal through aremote control.
 16. The process of claim 14, further comprising the stepof: providing a multimedia recording device, wherein said decoding stepsends any of a digital stream or a television output signal to saidmultimedia recording device for recording.
 17. The process of claim 14,further comprising the step of: inserting on-screen displays into atelevision output signal.
 18. The process of claim 14, furthercomprising the step of: providing editing means for creating customsequences of video and/or audio output; and wherein said editing meansallows any number of video and/or audio segments of digital streams tobe lined up and combined and stored on said storage device.
 19. Theprocess of claim 14, wherein an input stream can contain any of:software updates or data.
 20. A process for a digital video recorder,comprising the steps of: storing a plurality of multimedia programs indigital form on a storage device; playing back at least two of saidmultimedia programs from said storage device to at least one televisionmonitor; and wherein said playing back step allows playback rate anddirection of each multimedia program to be controlled individually toperform variable rate fast forward and rewind, frame step, pause, andplay functions.
 21. The process of claim 20, wherein said playing backstep converts said at least two of said multimedia programs intotelevision output signals;
 22. The process of claim 21, furthercomprising the step of: inserting on-screen displays into a televisionoutput signal.
 23. The process of claim 20, wherein a user controls theplayback rate and direction of a multimedia program through a remotecontrol.
 24. The process of claim 20, further comprising the step of:providing a multimedia recording device, wherein said playing back stepsends a multimedia program to said multimedia recording device, allowinga user to record said multimedia program.
 25. The process of claim 20,further comprising the step of: providing editing means for creatingcustom sequences of video and/or audio output; and wherein said editingmeans allows any number of video and/or audio segments of multimediaprograms to be lined up and combined and stored on said storage device.26. The process of claim 20, further comprising the steps of: providinga plurality of input signal tuners; wherein said tuners accept analogand digital multimedia program signals; wherein each of said tuners isindividually tuned to a specific multimedia program; converting analogmultimedia programs into a digital representation; and wherein saidstoring step separates a digitized analog multimedia program or digitalmultimedia program into its video and audio components before storing onsaid storage device.
 27. The process of claim 26, further comprising thestep of: providing means for synchronizing video and audio componentsfor proper playback.
 28. The process of claim 26, wherein an inputsignal tuner receives any of: software updates or data.
 29. An apparatusfor a digital video recorder, comprising: a plurality of input signaltuners; wherein said tuners accept analog and digital televisionbroadcast signals; wherein each of said tuners is individually tuned toa specific broadcast signal; a module for converting analog televisionbroadcast signals into a digital signal; a module for separating adigital signal or digital television broadcast signal into its video andaudio components; a module for storing said video and audio componentson a storage device; a plurality of output devices; wherein each outputdevice extracts a specific video and audio component from said storagedevice; a module for decoding each specific video and audio componentinto a television output signal; and a module for sending televisionoutput signals to at least one display device; wherein said decodingmodule allows playback rate and direction of each television outputsignal to be controlled individually to perform variable rate fastforward and rewind, frame step, pause, and play functions.
 30. Theapparatus of claim 29, wherein a user controls the playback rate anddirection of a television output signal through a remote control. 31.The apparatus of claim 29, further comprising: a multimedia recordingdevice, wherein said decoding module sends any of a specific video andaudio component or a television output signal to said multimediarecording device for recording.
 32. The apparatus of claim 29, furthercomprising: a module for inserting on-screen displays into a televisionoutput signal.
 33. The apparatus of claim 29, further comprising:editing means for creating custom sequences of video and/or audiooutput; and wherein said editing means allows any number of video and/oraudio segments to be lined up and combined and stored on said storagedevice.
 34. The apparatus of claim 29, further comprising: means forsynchronizing video and audio components for proper playback.
 35. Theapparatus of claim 29, wherein an input signal tuner receives any of:software updates or data.
 36. An apparatus for a digital video recorder,comprising: a module for receiving a plurality of television broadcastsignals; a module for storing each television broadcast signal in adigital form on a storage device; a plurality of output devices; whereineach output device extracts a specific digital broadcast signal fromsaid storage device; a module for converting each specific digitalbroadcast signal into a television output signal; a module for sendingtelevision output signals to at least one display device; and whereinsaid converting module allows playback rate and direction of eachtelevision output signal to be controlled individually to performvariable rate fast forward and rewind, frame step, pause, and playfunctions.
 37. The apparatus of claim 36, wherein a user controls theplayback rate and direction of a television output signal through aremote control.
 38. The apparatus of claim 36, further comprising: amultimedia recording device, wherein said converting module sends any ofa specific digital broadcast signal or a television output signal tosaid multimedia recording device for recording.
 39. The apparatus ofclaim 36, further comprising: a module for inserting on-screen displaysinto a television output signal.
 40. The apparatus of claim 36, furthercomprising: editing means for creating custom sequences of video and/oraudio output; and wherein said editing means allows any number of videoand/or audio segments of digital broadcast signals to be lined up andcombined and stored on said storage device.
 41. The apparatus of claim36, wherein a television broadcast signal can contain any of: softwareupdates or data.
 42. An apparatus for a digital video recorder,comprising: a module for receiving a plurality of input streams; amodule for storing said plurality of input streams in digital form on astorage device; a plurality of output devices; wherein each outputdevice extracts a digital stream from said storage device; a module fordecoding each digital stream into a television output signal; and amodule for sending television output signals to at least one displaydevice; wherein said decoding module allows playback rate and directionof each television output signal to be controlled individually toperform variable rate fast forward and rewind, frame step, pause, andplay functions.
 43. The apparatus of claim 42, wherein a user controlsthe playback rate and direction of a television output signal through aremote control.
 43. The apparatus of claim 42, further comprising: amultimedia recording device, wherein said decoding module sends any of adigital stream or a television output signal to said multimediarecording device for recording.
 44. The apparatus of claim 42, furthercomprising: a module for inserting on-screen displays into a televisionoutput signal.
 45. The apparatus of claim 42, further comprising:editing means for creating custom sequences of video and/or audiooutput; and wherein said editing means allows any number of video and/oraudio segments of digital streams to be lined up and combined and storedon said storage device.
 46. The apparatus of claim 42, wherein an inputstream can contain any of: software updates or data.
 47. An apparatusfor a digital video recorder, comprising: a module for storing aplurality of multimedia programs in digital form on a storage device; amodule for playing back at least two of said multimedia programs fromsaid storage device to at least one television monitor; and wherein saidplaying back module allows playback rate and direction of eachmultimedia program to be controlled individually to perform variablerate fast forward and rewind, frame step, pause, and play functions. 48.The apparatus of claim 47, wherein said playing back step converts saidat least two of said multimedia programs into television output signals;49. The apparatus of claim 48, further comprising: a module forinserting on-screen displays into a television output signal.
 50. Theapparatus of claim 47, wherein a user controls the playback rate anddirection of a multimedia program through a remote control.
 51. Theapparatus of claim 47, further comprising: a multimedia recordingdevice, wherein said playing back module sends a multimedia program tosaid multimedia recording device, allowing a user to record saidmultimedia program.
 52. The apparatus of claim 47, further comprising:editing means for creating custom sequences of video and/or audiooutput; and wherein said editing means allows any number of video and/oraudio segments of multimedia programs to be lined up and combined andstored on said storage device.
 53. The apparatus of claim 47, furthercomprising: a plurality of input signal tuners; wherein said tunersaccept analog and digital multimedia program signals; wherein each ofsaid tuners is individually tuned to a specific multimedia program; amodule for converting analog multimedia programs into a digitalrepresentation; and wherein said storing module separates a digitizedanalog multimedia program or digital multimedia program into its videoand audio components before storing on said storage device.
 55. Theapparatus of claim 54, further comprising the step of: means forsynchronizing video and audio components for proper playback.
 56. Theapparatus of claim 54, wherein an input signal tuner receives any of:software updates or data.